package com.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.data.request.ReqTeacherList;
import com.example.data.response.RespTeacherInfo;
import com.example.entity.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Author:yanghua
 * Date:2023/10/8 8:29
 */
@Mapper
public interface TeacherDao extends BaseMapper<Teacher> {

    @Select("select * from teacher where del = 0")
    List<Teacher> getAllTeachers();

    @Update("update teacher set del = 1 where id = #{id}")
    Integer deleteTeacher(Long id);

    List<RespTeacherInfo> getTeacherList(ReqTeacherList reqTeacherList);

    Integer getTeacherNum(ReqTeacherList reqTeacherList);
}
